<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人博客管理页面共同部分</title>
</head>
<body>
<!-- 导航栏部分 -->
<nav th:fragment="firstmenu(n)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">Java</h2>
            <a href="#" th:href="@{/admin/blogs}" class="m-item item m-mobile-hide" th:classappend="${n==1} ? 'active red'"><i class="home icon"></i>博客</a>
            <a href="#" th:href="@{/admin/types}" class="m-item item m-mobile-hide" th:classappend="${n==2} ? 'active red'"><i class="idea icon"></i>分类</a>
            <a href="#" th:href="@{/admin/tags}" class="m-item item m-mobile-hide" th:classappend="${n==3} ? 'active red'"><i class="tags icon"></i>标签</a>
            <div class="right m-item m-mobile-hide menu">
                <div class="ui dropdown item">
                    <div class="text">
                        <img class="ui avatar image" style="height: 28px; width: 28px;" th:src="@{${session.user.avatar}}">
                        <span th:text="${session.user.nickname}">CatchLighting</span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="#" th:href="@{/admin/logout}" class="item">注销</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>
<!-- 二级导航 -->
<div th:fragment="secondmenu(n,tag1,tag2)" class="ui attached pointing menu">
    <div class="ui container">
        <div class="right menu">
            <a th:replace="${tag1}" href="#" class="item" th:classappend="${n==1} ? 'teal active'">发布</a>
            <a th:replace="${tag2}" href="#" class="item" th:classappend="${n==2} ? 'teal active'">列表</a>
        </div>
    </div>
</div>

</body>
</html>